Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): add register static method #136 #132 #137

Merged
merged 16 commits into from
Nov 5, 2024

Conversation

sun-mota
Copy link
Contributor

@sun-mota sun-mota commented Oct 23, 2024

Alaska Airlines Pull Request

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Resolves: #132 #136 #138

Summary:

  • Update dependency versions

  • AuroFlight.register is to easily register the element without extra importing

  • import "@aurodesignsystem/auro-flight" will still register this element to

  • import { AuroFlight } from '../src/auro-flight wont register this element until AuroFlight.register gets called

Type of change:

Please delete options that are not relevant.

  • New capability
  • Revision of an existing capability
  • Infrastructure change (automation, etc.)
  • Other (please elaborate)

Checklist:

  • My update follows the CONTRIBUTING guidelines of this project
  • I have performed a self-review of my own update

By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Pull Requests will be evaluated by their quality of update and whether it is consistent with the goals and values of this project. Any submission is to be considered a conversation between the submitter and the maintainers of this project and may require changes to your submission.

Thank you for your submission!

-- Auro Design System Team

Summary by Sourcery

Add a static method 'AuroFlight.register' to enable custom registration of the 'auro-flight' element, update Rollup build configuration for demo examples, and enhance documentation with usage guidelines and examples for the new registration method.

New Features:

  • Introduce a static method 'AuroFlight.register' to allow custom registration of the 'auro-flight' element with a unique name.

Enhancements:

  • Update Rollup configuration to include a new build target for demo examples, outputting to 'index.min.js'.

Documentation:

  • Add documentation on recommended use and version control for the 'AuroFlight.register' method, including examples of custom element registration.

- Update dependency versions

- `AuroFlight.register` is to easily register the element without extra importing
- `import "@aurodesignsystem/auro-flight"` will still register this element to <auro-flight>
- `import { AuroFlight } from '../src/auro-flight` wont register this element until `AuroFlight.register` gets called
@sun-mota sun-mota requested a review from a team as a code owner October 23, 2024 19:57
@sun-mota sun-mota self-assigned this Oct 23, 2024
Copy link

sourcery-ai bot commented Oct 23, 2024

Reviewer's Guide by Sourcery

This PR introduces a new static register method to the AuroFlight component, allowing for custom element registration with unique names to prevent version conflicts. The implementation includes documentation updates, code examples, and build configuration changes.

Class diagram for AuroFlight with new register method

classDiagram
    class AuroFlight {
        +static register(name="auro-flight")
        +firstUpdated()
    }
    note for AuroFlight "The register method allows custom element registration with a unique name."
Loading

File-Level Changes

Change Details Files
Added static register method for custom element registration
  • Implemented static register method with optional name parameter defaulting to 'auro-flight'
  • Removed default element registration code
  • Added utility method call to handle component registration
src/auro-flight.js
Updated documentation with custom element registration examples
  • Added new section explaining component versioning and registration
  • Included code examples showing custom element registration
  • Added example implementation with custom element name
demo/index.md
docs/partials/index.md
Modified build configuration and dependencies
  • Added new rollup configuration for index examples
  • Updated script references in demo pages
  • Removed unnecessary icon dependency
rollup.config.mjs
demo/index.html
demo/api.html

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sun-mota sun-mota linked an issue Oct 23, 2024 that may be closed by this pull request
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @sun-mota - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider keeping the default element registration for while adding the new register capability to maintain backward compatibility. Completely removing it could break existing implementations.
Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟡 Complexity: 1 issue found
  • 🟡 Documentation: 1 issue found

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

rollup.config.mjs Show resolved Hide resolved
demo/index.md Outdated Show resolved Hide resolved
demo/index.min.js Show resolved Hide resolved
demo/index.min.js Outdated Show resolved Hide resolved
demo/index.min.js Outdated Show resolved Hide resolved
demo/index.min.js Outdated Show resolved Hide resolved
demo/index.min.js Outdated Show resolved Hide resolved
demo/index.min.js Outdated Show resolved Hide resolved
demo/index.min.js Show resolved Hide resolved
demo/index.min.js Show resolved Hide resolved
Copy link
Member

@jason-capsule42 jason-capsule42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Demo API page needs to import the same way as the index page.

Copy link
Member

@jason-capsule42 jason-capsule42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to release first: AlaskaAirlines/auro-flightline#77

Then do a dependency update on this PR.

package.json Show resolved Hide resolved
demo/api.html Outdated Show resolved Hide resolved
demo/api.js Outdated Show resolved Hide resolved
demo/api.md Show resolved Hide resolved
demo/index.html Outdated Show resolved Hide resolved
docs/api.md Show resolved Hide resolved
@sun-mota sun-mota force-pushed the sunMota/easyRegistry/136 branch from 52902ea to 748de85 Compare November 1, 2024 17:25
@sun-mota sun-mota changed the title feat(api): add register static method #82 feat(api): add register static method #136 #132 Nov 1, 2024
@sun-mota sun-mota linked an issue Nov 1, 2024 that may be closed by this pull request
@sun-mota sun-mota linked an issue Nov 5, 2024 that may be closed by this pull request
@sun-mota sun-mota merged commit 0d0ac1b into main Nov 5, 2024
6 checks passed
@sun-mota sun-mota deleted the sunMota/easyRegistry/136 branch November 5, 2024 23:47
@blackfalcon
Copy link
Member

🎉 This PR is included in version 3.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@blackfalcon blackfalcon added the released Completed work has been released label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Completed work has been released
Projects
None yet
4 participants